home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #6
/
Amiga Plus CD - 2004 - No. 06.iso
/
AmigaPlus
/
Begleitmaterial
/
50Tools
/
Grafik
/
PerfectPaint
/
rexx
/
bridge
/
CropPic.rx
< prev
next >
Wrap
Text File
|
2002-12-18
|
914b
|
59 lines
/* arexx Script
Crop Anim
*/
options results
parse ARG Port CropX CropY CropW CropH b
ADDRESS value Port
/*pp_AvoidRefresh*/
pp_GetWidth
W=result
pp_GetHeight
H=result
pp_GetWidthB
Wb=result
IsBrush=0
IF Wb>0 then DO
IsBrush=1
pp_Bsave "perfectpaint:Temp/brush" 0 3
END
X2=CropW/2
Y2=CropH/2
pp_CountFrames
nb=result
if nb>1 then do
Do i=1 to nb
pp_GotoFrame i
pp_PickBrush CropX CropY CropW CropH 1
pp_Bsave 'PerfectPaint:Temp/Anim'||i 0 1
pp_GetJiffies
J.i=result
END
pp_New CropW CropH
pp_MakeAnim nb 0
pp_Bload 'PerfectPaint:Temp/Anim1'
pp_Plot X2 Y2
pp_SetJiffies 1 J.1
do i=2 to nb
pp_Bload 'PerfectPaint:Temp/Anim'||i
pp_NextFrame
pp_Plot X2 Y2
pp_SetJiffies i J.i
END
pp_FreeBrush
IF IsBrush=1 then DO
pp_Bload "perfectpaint:Temp/brush"
END
ADDRESS COMMAND 'delete >nil: PerfectPaint:Temp/?#.*'
EXIT
END